Flash memory has been widely used in various electric products. The flash memory is a type of non-volatile memory which can retain its data when power is off. However, the flash memory may be left in an incomplete state by a power failure event as data operations (e.g., program/erase operation) in progress.